package com.sxwl.auth.mapper;

import com.sxwl.pojo.ChatRecord;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

/**
 * @author reading
 * @Description TODO
 * @Date 2020/4/14 20:38
 */
public interface ChatRecordMapper extends Mapper<ChatRecord> {
    @Select("SELECT * FROM chat_record  WHERE userid=#{userid} AND friendid=#{friendid} ORDER BY id DESC LIMIT 0,1\n")
    ChatRecord getChatRecord(@Param("userid")String userid, @Param("friendid") String friendid);
}
